﻿using System;

namespace Tequila.Phone.Infrastructure.Logging
{
    /// <summary>
    /// <see cref="ILogger">Logger</see> factory implementation.
    /// </summary>
    public sealed class DefaultLoggerFactory : ILoggerFactory
    {
        #region Implementation of ILoggerFactory
        
        /// <summary>
        /// Gets <see cref="ILogger">Logger</see> instance by specified name.
        /// </summary>
        /// <param name="name"><see cref="ILogger">Logger</see> instance name.</param>
        /// <returns><see cref="ILogger">Logger</see> instance.</returns>
        public ILogger Get(string name)
        {
            return new DefaultLogger(name);
        }

        /// <summary>
        /// Gets <see cref="ILogger">Logger</see> instance by specified <see cref="T:System.Type">type</see>.
        /// </summary>
        /// <param name="type"><see cref="ILogger">Logger</see> type.</param>
        /// <returns><see cref="ILogger">Logger</see> instance.</returns>
        public ILogger Get(Type type)
        {
            return new DefaultLogger(type);
        }

        #endregion
    }
}